<!-- 供应商确认代办组件 -->
<template>
  <div>
    <el-header v-if="urlData.up === '0' && getUrlData.workItemId" height="36px">
      <header-title :title="urlData.titles" />
    </el-header>
    <TCollapse
      title="采购订单调整情况"
      :router-path="'suppierConfirm'"
      :url-data="getUrlData"
      :is-show-fuscreen="urlData.up === '0'"
    >
      <!-- 消息提示 -->
      <MessageTitle :show-title="showTitle" :message-list="suppierMessageList" />
      <!-- 供应商确认代办表格 -->
      <SuppierTable :get-url-data="getUrlData" v-bind="$attrs"/>
    </TCollapse>
  </div>
</template>

<script>
import HeaderTitle from '@/components/basic/HeaderTitle'
import TCollapse from '../components/TCollapse.vue'
import MessageTitle from '../components/MessageTitle.vue'
import SuppierTable from './suppierTable.vue'
import { getQueryObject } from '@/utils'
import { suppierMessageList } from '../index.js'
export default {
    name: 'SuppierConfirm',
    components: {
        TCollapse,
        MessageTitle,
        SuppierTable,
        HeaderTitle
    },
    props: {
        // 主页面获取到的浏览器地址参数
        paramsObj: {
            type: Object,
            default: () => ({ })
        }
    },
    data() {
        return {
            // 是否显示标题提示
            showTitle: true,
            // 大屏跳转过来需要用的url地址数据
            urlData: {
            },
            suppierMessageList// 供应商确认代办提示消息
        }
    },
    computed: {
        // 重要 判断是否是全屏来的 还是 默认进来的 浏览器地址
        getUrlData() {
            return this.paramsObj?.adjustId !== undefined ? this.paramsObj : this.urlData
        }
    },
    created() {
        this.initBrowserAddressParams()
    },
    methods: {
        // 初始化获取浏览器地址参数
        initBrowserAddressParams() {
            const obj = getQueryObject()
            this.urlData = obj
        }
    }
}

</script>
<style lang="scss" scoped></style>
